printf "$(ifconfig | awk '/inet / {if ($2 ~ /^(10\..*|172\.(1[6-9]|2[0-9]|3[01])\..*|192\.168\..*)$/ && $2 != "127.0.0.1") {print "内网IP: " $2}}' ; ip=$(curl -s ifconfig.me); [ $? -eq 0 ] && printf '外网IP: %s\n' "$ip")" >~/.ip.temp && chmod +x ~/.ip.temp ; TERM=ansi whiptail --title "IP查询" --infobox "$(cat ~/.ip.temp)" 10 40